export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/login',
          },
        ],
      },
    ],
  },
  {
    path: '/welcome',
    name: '信息统计',
    icon: 'dashboard',
    component: './Welcome',
  },
  {
    path: '/meituan',
    name: '美团管理',
    icon: 'shop',
    routes: [
      {
        path: '/meituan',
        redirect: '/meituan/config',
      },
      {
        path: '/meituan/config',
        name: '美团配置',
        component: './meituan/config',
      },
      {
        path: '/meituan/order',
        name: '美团订单',
        component: './meituan/order',
      },
      {
        path: '/meituan/group',
        name: '团购活动',
        component: './meituan/group',
      },
      {
        path: '/meituan/group/order',
        name: '团购订单',
        component: './meituan/group/order',
      },
    ],
  },
  {
    path: '/douyin',
    name: '抖音管理',
    icon: 'video-camera',
    routes: [
      {
        path: '/douyin',
        redirect: '/douyin/config',
      },
      {
        path: '/douyin/config',
        name: '抖音配置',
        component: './douyin/config',
      },
      {
        path: '/douyin/group',
        name: '团购活动',
        component: './douyin/group',
      },
      {
        path: '/douyin/order',
        name: '团购订单',
        component: './douyin/order',
      },
    ],
  },
  {
    path: '/admin',
    name: '系统管理',
    icon: 'setting',
    access: 'hasPermission',
    routes: [
      {
        path: '/admin/users',
        name: '用户管理',
        component: './admin/users',
        access: 'hasPermission',
      },
      {
        path: '/admin/roles',
        name: '角色管理',
        component: './admin/roles',
        access: 'hasPermission',
      },
      {
        path: '/admin/permissions',
        name: '权限管理',
        component: './admin/permissions',
        access: 'hasPermission',
      },
      {
        path: '/admin/logs',
        name: '操作日志',
        component: './admin/logs',
        access: 'hasPermission',
      },
      {
        path: '/admin/franchise',
        name: '加盟商管理',
        component: './admin/franchise',
        access: 'hasPermission',
      },
    ],
  },
  {
    path: '/miniprogram',
    name: '小程序管理',
    icon: 'appstore',
    routes: [
      {
        path: '/miniprogram/config',
        name: '小程序配置',
        component: './miniprogram/config',
      },
      {
        path: '/miniprogram/content',
        name: '内容管理',
        component: './miniprogram/content',
      },
      {
        path: '/miniprogram/banner',
        name: '轮播图设置',
        component: './miniprogram/banner',
      },
    ],
  },
  {
    path: '/payment',
    name: '支付管理',
    icon: 'dollar',
    routes: [
      {
        path: '/payment/channel',
        name: '支付渠道配置',
        component: './payment/channel',
      },
      {
        path: '/payment/transaction',
        name: '交易记录查询',
        component: './payment/transaction',
      },
      {
        path: '/payment/refund',
        name: '退款处理',
        component: './payment/refund',
      },
    ],
  },
  {
    path: '/coupon',
    name: '优惠券管理',
    icon: 'gift',
    routes: [
      {
        path: '/coupon/list',
        name: '优惠券列表',
        component: './coupon/list',
      },
      {
        path: '/coupon/issue',
        name: '优惠券发放',
        component: './coupon/issue',
      },
      {
        path: '/coupon/activity',
        name: '优惠活动管理',
        component: './coupon/activity',
      },
    ],
  },
  {
    path: '/recharge',
    name: '充值管理',
    icon: 'wallet',
    routes: [
      {
        path: '/recharge/package',
        name: '充值套餐配置',
        component: './recharge/package',
      },
      {
        path: '/recharge/record',
        name: '充值记录查询',
        component: './recharge/record',
      },
    ],
  },
  {
    path: '/groupbuy',
    name: '团购管理',
    icon: 'team',
    routes: [
      {
        path: '/groupbuy/activity',
        name: '团购活动创建',
        component: './groupbuy/activity',
      },
      {
        path: '/groupbuy/order',
        name: '团购订单管理',
        component: './groupbuy/order',
      },
      {
        path: '/groupbuy/statistics',
        name: '团购数据统计',
        component: './groupbuy/statistics',
      },
      {
        path: '/groupbuy/verify',
        name: '核销记录',
        component: './groupbuy/verify',
      },
    ],
  },
  {
    path: '/member',
    name: '会员管理',
    icon: 'user',
    routes: [
      {
        path: '/member/list',
        name: '会员信息查询',
        component: './member/list',
      },
      {
        path: '/member/level',
        name: '会员等级设置',
        component: './member/level',
      },
      {
        path: '/member/card',
        name: '会员卡',
        component: './member/card',
      },
      {
        path: '/member/points',
        name: '积分变动记录',
        component: './member/points',
      },
      {
        path: '/member/balance',
        name: '余额变动记录',
        component: './member/balance',
      },
    ],
  },
  {
    path: '/order',
    name: '订单管理',
    icon: 'shopping',
    routes: [
      {
        path: '/order/list',
        name: '订单查询',
        component: './order/list',
      },
      {
        path: '/order/process',
        name: '订单处理',
        component: './order/process',
      },
      {
        path: '/order/statistics',
        name: '订单统计',
        component: './order/statistics',
      },
    ],
  },
  {
    path: '/store',
    name: '门店管理',
    icon: 'shop',
    routes: [
      {
        path: '/store/list',
        name: '门店信息管理',
        component: './store/list',
      },
      {
        path: '/store/venue',
        name: '场地管理',
        component: './store/venue',
      },
      {
        path: '/store/time',
        name: '营业时间设置',
        component: './store/time',
      },
      {
        path: '/store/venue_package',
        name: '场地套餐',
        component: './store/venue_package',
      },
      {
        path: '/store/booking/setting',
        name: '预约规则设置',
        component: './store/booking/setting',
      },
    ],
  },
  {
    name: '设备管理',
    icon: 'laptop',
    path: '/device',
    routes: [
      {
        name: '设备列表',
        path: '/device/list',
        component: './device/list',
      },
      {
        name: '设备详情',
        path: '/device/detail',
        component: './device/detail',
        hideInMenu: true,
      },
      {
        name: '设备分组',
        path: '/device/group',
        component: './device/group',
      },
    ],
  },
  {
    path: '/cleaning',
    name: '保洁管理',
    icon: 'clear',
    routes: [
      {
        path: '/cleaning/record',
        name: '保洁记录',
        component: './cleaning/record',
      },
      {
        path: '/cleaning/cleaner',
        name: '保洁人员管理',
        component: './cleaning/cleaner',
      },
      {
        path: '/cleaning/setting',
        name: '保洁设置',
        component: './cleaning/setting',
      },
    ],
  },
  {
    path: '/account',
    routes: [
      {
        path: '/account/change_password',
        name: 'change_password',
        component: './Account/ChangePassword',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];